-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Upgrade RTS Dependencies #4677
base: master
Are you sure you want to change the base?
Conversation
-mllvm -enable-emscripten-sjlj -mllvm -disable-lsr \ | ||
-Wno-override-module | ||
RTS_LL_64_DEBUG=$(RTS_LL_64) | ||
RTS_LL_64_RELEASE=$(RTS_LL_64) -Oz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be that the change from 02 to 0z is causing the rts size increase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the increase would be even higher with O2
. I'll double check and let you know.
Upgrading Motoko RTS dependencies:
Special aspects:
wasm32
andwasm64
.dylink.0
instead ofdylink
.GOT.mem
for RTS in the Motoko linker.wasm-ld
) needs a bug fix: [lld][WebAssembly] Fix relocation of Wasm table index with GOT access llvm/llvm-project#104043. Therefore, patchingwasm-ld
.musl
. There are format changes to output ofNaN
andinfinity
. Moreover, one particular output format (hexadecimal float) is no longer supported. Updating the documentation and base library is needed.musl
is still used in 32-bit but not in 64-bit. In the future, we should get rid ofmusl
entirely. Themusl
import is rather old, upgrading is complicated as it involves a lot of unwanted dependencies.emscripten
for 64-bit Wasm compilation (as there is a nix build issue with latestemscripten
). Instead, theclang
compiler is directly invoked.wasm-opt
is applied to again reduce it to an acceptable size.Note:
nix-shell
crashes with a segmentation fault with this PR, you need to upgradenix
. For this, you need to manually uninstall and re-installnix
.